import 'package:flutter/material.dart';

class FilterDropdownButton extends StatelessWidget {
  final String text;
  final VoidCallback onPressed;

  const FilterDropdownButton({
    super.key,
    required this.text,
    required this.onPressed,
  });

  @override
  Widget build(BuildContext context) {
    return TextButton(
      onPressed: onPressed,
      style: TextButton.styleFrom(
        backgroundColor: Colors.white,
        padding: const EdgeInsets.symmetric(
          horizontal: 16,
          vertical: 12,
        ),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(8),
        ),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            text,
            style: const TextStyle(
              color: Colors.black87,
              fontSize: 14,
            ),
          ),
          const Icon(
            Icons.keyboard_arrow_down,
            color: Colors.black54,
          ),
        ],
      ),
    );
  }
}